package com.tarena.lbs.content.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tarena.lbs.content.pojo.po.ArticleCategoryPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;


@Mapper
public interface CategoryMapper extends BaseMapper<ArticleCategoryPO> {
    
    /**
     * 获取所有启用的文章分类，按排序字段升序排列
     * @return 文章分类列表
     */
    @Select("SELECT * FROM article_category WHERE category_status = 1 ORDER BY sort ASC")
    List<ArticleCategoryPO> selectAllEnabledCategories();
}